package com.code.zg.news.utils;


import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by zhanggang on 2017/2/28.
 */

public class RxUtils {
    public static <T>Observable.Transformer<T,T> rxSchedulesHelper(){
        return new Observable.Transformer<T, T>() {
            @Override
            public Observable<T> call(Observable<T> tObservable) {
                return tObservable.subscribeOn(AndroidSchedulers.mainThread())
                        .observeOn(Schedulers.io());
            }
        };

    }
}
